﻿namespace Neovolve.Extensibility.ReSharper
{
    using System;
    using JetBrains.ReSharper.Psi.Parsing;

    /// <summary>
    /// The <see cref="AliasTypeMapping"/>
    ///   class is used to define a type mapping between an alias type 
    ///   and a CLR type. For example, it may define a mapping between bool and Boolean.
    /// </summary>
    [CLSCompliant(false)]
    public class AliasTypeMapping
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="AliasTypeMapping"/> class.
        /// </summary>
        /// <param name="aliasTypeName">
        /// Name of the alias type.
        /// </param>
        /// <param name="aliasTokenType">
        /// Type of the alias token.
        /// </param>
        /// <param name="clrTypeName">
        /// Name of the CLR type.
        /// </param>
        public AliasTypeMapping(String aliasTypeName, TokenNodeType aliasTokenType, String clrTypeName)
        {
            AliasTypeName = aliasTypeName;
            AliasTokenType = aliasTokenType;
            ClrTypeName = clrTypeName;
        }

        /// <summary>
        /// Gets the type of the alias token.
        /// </summary>
        /// <value>
        /// The type of the alias token.
        /// </value>
        public TokenNodeType AliasTokenType
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the name of the alias type.
        /// </summary>
        /// <value>
        /// The name of the alias type.
        /// </value>
        public String AliasTypeName
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the name of the CLR type.
        /// </summary>
        /// <value>
        /// The name of the CLR type.
        /// </value>
        public String ClrTypeName
        {
            get;
            private set;
        }
    }
}